package com.google.code.ratingscalculator;

import java.util.Comparator;

public class Player {
    String name;
    double rating;
}

class PlayerRatingsComparator implements Comparator<Player> {
    public int compare(Player o1, Player o2) {
        if(o1.rating > o2.rating) return -1;
        if(o1.rating < o2.rating) return 1;
        return o1.name.compareTo(o2.name);
    }
}
